﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using OboutInc.Window;
using Obout.Grid;
using E2_WEBSITE.Code.Product;
using System.Collections.Generic;

namespace E2_WEBSITE
{
    public partial class SaleOff : System.Web.UI.Page
    {
        private ProductController m_productController = new ProductController();

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                DataBindingListProductSaleOff();

                Window myWindow = this.Master.FindControl("ContentPlaceHolder1").FindControl("myWindow") as Window;
                myWindow.PageOpacity = 30;
                myWindow.IsDraggable = false;
                myWindow.IsResizable = false;
            }
        }

        protected void DataBindingListProductSaleOff()
        {
            Grid grid1 = this.Master.FindControl("ContentPlaceHolder1").FindControl("grid1") as Grid;
            DataTable table = m_productController.GetTableProductSaleOff();
            if (table != null)
            {
                grid1.DataSource = table;
                grid1.DataBind();
            }
        }
    }
}
